name: pre-commit run_id: commands[0] env HOME: /home/jenkins env LANG: C.UTF-8 env PATH: /w/workspace/bgpcep-tox-verify-master/.tox/pre-commit/bin:/opt/pyenv/bin:/tmp/venv-i4Ax/bin:/opt/pyenv/shims:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin env PIP_DISABLE_PIP_VERSION_CHECK: 1 env PYTHONHASHSEED: 716678095 env PYTHONIOENCODING: utf-8 env SSH_AUTH_SOCK: ******************************** env TOX_ENV_DIR: /w/workspace/bgpcep-tox-verify-master/.tox/pre-commit env TOX_ENV_NAME: pre-commit env TOX_WORK_DIR: /w/workspace/bgpcep-tox-verify-master/.tox env VIRTUAL_ENV: /w/workspace/bgpcep-tox-verify-master/.tox/pre-commit metadata pid: 2412 cwd: /w/workspace/bgpcep-tox-verify-master allow: /w/workspace/bgpcep-tox-verify-master/.tox/pre-commit/bin/* cmd: pre-commit run --all-files --show-diff-on-failure exit_code: 1 [WARNING] hook id `remove-tabs` uses deprecated stage names (commit) which will be removed in a future version. run: `pre-commit migrate-config` to automatically fix this. [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks. [WARNING] repo `https://github.com/pre-commit/pre-commit-hooks` uses deprecated stage names (commit, push) which will be removed in a future version. Hint: often `pre-commit autoupdate --repo https://github.com/pre-commit/pre-commit-hooks` will fix this. if it does not -- consider reporting an issue to that repo. [INFO] Initializing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... trim trailing whitespace.................................................Failed - hook id: trailing-whitespace - exit code: 1 - files were modified by this hook Fixing tests/lib/bgp.py Fixing tests/test_bgp_app_peer_prefix_count.py Fixing tests/lib/utils.py Fixing tests/test_manypeers_change_count.py Tabs remover.............................................................Passed pre-commit hook(s) made changes. If you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`. To run `pre-commit` as part of git workflow, use `pre-commit install`. All changes made by hooks: diff --git a/tests/lib/bgp.py b/tests/lib/bgp.py index c3ab4c98b4..4b6039ae75 100644 --- a/tests/lib/bgp.py +++ b/tests/lib/bgp.py @@ -71,7 +71,7 @@ def start_bgp_speaker(ammount, insert=None, withdraw=None, prefill=None, update= --myport=17900 \ --peerip=127.0.0.1 \ --peerport=1790"] - + if insert is not None: command_parts.append(f"--insert={insert}") if withdraw is not None: @@ -86,10 +86,10 @@ def start_bgp_speaker(ammount, insert=None, withdraw=None, prefill=None, update= command_parts.append("--listen") command_parts.append("--info >tmp/play.py.out 2>&1") - + process = infra.shell(" ".join(command_parts), run_in_background=True) - + return process def stop_bgp_speaker(process): @@ -98,7 +98,7 @@ def stop_bgp_speaker(process): infra.shell("cat play.py.out") def start_bgp_app_peer(count=None, command="post", prefix="8.0.0.0", prefix_len=28, uri="data/bgp-rib:application-rib=10.0.0.10/tables=bgp-types%3Aipv4-address-family,bgp-types%3Aunicast-subsequent-address-family", log_level="info", timeout=1200): - + process = infra.shell(f"python tools/bgp_app_peer.py \ {'--count ' + str(count) if count is not None else ''}\ --host 127.0.0.1 \ @@ -112,5 +112,5 @@ def start_bgp_app_peer(count=None, command="post", prefix="8.0.0.0", prefix_len= >bgp_app_peer.log 2>&1", timetout=timeout, run_in_background=False) - + return process diff --git a/tests/lib/utils.py b/tests/lib/utils.py index 27094ece73..b0e3560f6f 100644 --- a/tests/lib/utils.py +++ b/tests/lib/utils.py @@ -27,7 +27,7 @@ def retry_function(retry_count, interval, function, *args, **kwargs): def retry_function_and_expect_value(retry_count, interval, expected_value, function, *args, **kwargs): validator = lambda value: value == expected_value return retry_function_with_return_value_validator(retry_count, interval, function, validator, *args, **kwargs) - + def retry_function_with_return_value_validator(retry_count, interval, function, return_value_validator, *args, **kwargs): for retry_num in range(retry_count): try: diff --git a/tests/test_bgp_app_peer_prefix_count.py b/tests/test_bgp_app_peer_prefix_count.py index 7c8f86838a..30821d0ec2 100644 --- a/tests/test_bgp_app_peer_prefix_count.py +++ b/tests/test_bgp_app_peer_prefix_count.py @@ -122,6 +122,5 @@ class TestBgpAppPeerPrefixCount: def test_delete_bgp_application_peer_configuration(self): bgp.set_bgp_application_peer(ip="10.0.0.10") - - \ No newline at end of file + diff --git a/tests/test_manypeers_change_count.py b/tests/test_manypeers_change_count.py index 53c99721e2..000b4fb18d 100644 --- a/tests/test_manypeers_change_count.py +++ b/tests/test_manypeers_change_count.py @@ -52,7 +52,7 @@ class TestSinglePeerChangeCount: time.sleep(1) else: raise Exception(f"Failed to get data change counter after {retires} retries") - + @pytest.mark.run(order=5) def test_change_karaf_logging_levels(self): infra.execute_karaf_command("log:set INFO org.opendaylight.bgpcep")